package exercise7;

public class SumIntegers extends BaseExample {
	public static void main(String[] args) {
        int sum = 0;
        if (args != null && args.length > 0) {
            for (String integerOne : args) {
                try {
                    int one = Integer.parseInt(integerOne);
                    sum = sum + one;
                } catch (NumberFormatException e) {
                    System.err.println("An error while format the String to int, " + e.getMessage());
                    continue;
                }
            }
        }
        System.out.println("The sum is " + sum);
    }

}
